﻿@using Newtonsoft.Json
@model Qask.Web.Models.ChangeTimeZoneViewModel
@{
    ViewBag.Title = "Change TimeZone";
}

<h2>@ViewBag.Title.</h2>

@Scripts.Render("~/bundles/ChangeTimeZoneJsBundle")

<div ng-controller="ChangeTimeZoneController" ng-init="init(@JsonConvert.SerializeObject(ViewBag.Timezones), @JsonConvert.SerializeObject(ViewBag.CurrentTimeZone))">
    @using (Html.BeginForm("ChangeTimeZone", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
    {
        @Html.AntiForgeryToken()
        <hr />
        @Html.ValidationSummary("", new { @class = "text-danger" })
        <div class="form-group">
            <div class="col-md-10">
                @Html.HiddenFor(m => m.UserId)
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label" for="Timezone">Timezone</label>
            <div class="col-md-10">
                <input id="Timezone" type="hidden" />
                @Html.HiddenFor(m => m.TimeZoneId)
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Change TimeZone" class="btn btn-default" />
            </div>
        </div>
    }
</div>